package org.aepscolombia.platform.models.entity;
// Generated Jan 13, 2014 2:36:33 PM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * MeasureUnits generated by hbm2java
 */
@Entity
@Table(name="measure_units"
    ,catalog="madr_bd10"
)
public class MeasureUnits  implements java.io.Serializable {


     private Integer idMeaUni;
     private String nameMeaUni;
     private Set farmses = new HashSet(0);

    public MeasureUnits() {
    }

	
    public MeasureUnits(String nameMeaUni) {
        this.nameMeaUni = nameMeaUni;
    }
    public MeasureUnits(String nameMeaUni, Set farmses) {
       this.nameMeaUni = nameMeaUni;
       this.farmses = farmses;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id_mea_uni", unique=true, nullable=false)
    public Integer getIdMeaUni() {
        return this.idMeaUni;
    }
    
    public void setIdMeaUni(Integer idMeaUni) {
        this.idMeaUni = idMeaUni;
    }
    
    @Column(name="name_mea_uni", nullable=false, length=45)
    public String getNameMeaUni() {
        return this.nameMeaUni;
    }
    
    public void setNameMeaUni(String nameMeaUni) {
        this.nameMeaUni = nameMeaUni;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="measureUnits")
    public Set getFarmses() {
        return this.farmses;
    }
    
    public void setFarmses(Set farmses) {
        this.farmses = farmses;
    }




}


